# $Id: PKGBUILD 86873 2013-03-23 23:10:32Z td123 $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=bugzilla
pkgver=4.2.5
pkgrel=2
pkgdesc="bug tracker"
arch=('any')
url="http://www.bugzilla.org"
license=("GPL")
depends=(perl perl-timedate perl-datetime
	 perl-chart perl-email-abstract perl-email-address perl-email-date-format
	 perl-email-messageid perl-email-mime perl-email-mime-attachment-stripper
	 perl-email-mime-contenttype perl-email-mime-encodings
	 perl-email-mime-modifier perl-email-mime-creator perl-email-reply perl-email-send perl-email-simple
	 perl-email-simple-creator perl-gd perl-gdgraph perl-gdtextutil perl-patchreader
	 perl-return-value perl-template-gd perl-ldap perl-soap-lite perl-authen-sasl
	 perl-xml-twig perl-html-scrubber perl-authen-radius perl-template-toolkit)
optdepends=('mod_perl'
	    'perl-dbd-pg'
	    'perl-dbd-mysql'
	    'perl-dbd-oracle'
	    'python2'
	    'ruby')
options=(!strip)
backup=('srv/http/bugzilla/.htaccess')
source=(http://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-$pkgver.tar.gz)
md5sums=('070c2d9eee81b2ba621c45d1d3849f66')

package() {
  cd $srcdir
  install -d -m0755 $pkgdir/srv/http
  find $pkgname-$pkgver -type d -name CVS -exec rm -rf {} \; || true
  find $pkgname-$pkgver -type f -name .cvsignore -exec rm -f {} \; || true
  cp -a $pkgname-$pkgver $pkgdir/srv/http/bugzilla
  rm -rf $pkgdir/srv/http/bugzilla/.bzr
  rm -rf $pkgdir/srv/http/bugzilla/.bzrrev
  rm -rf $pkgdir/srv/http/bugzilla/.bzrignore
}
